<?php
include ("../../inc/global.inc");
include("../islogin.php");
$url="zl_pay.php";
$thepage=$_GET['page']?$_GET['page']:1;
$maxpage=20;
?>
<?php
//删除信息
if($_GET['del_act']){
$urls=$_SERVER['HTTP_REFERER'];
@mysql_query("delete from zl_pay where id='".$_GET['del_id']."'");

echo "<script>location='".$urls."';</script>";
}
?>
<HTML>
<HEAD>
<TITLE>admin</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="../css/css.css" rel=stylesheet>
<script type='text/javascript' src="../js/islogin.js" charset="gb2312"></script>
</HEAD>
<BODY>
<center>
  <table width="80%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td height="25" bgcolor="#EEEEF9" style="padding-left:5px;">三帝资料下载管理&nbsp;&nbsp;<a href="javascript:history.go(-1)">返回</a></td>
    </tr>
  </table>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000" > 
	<tr align='center' bgcolor='#D8EAF4'>
	<td width="6%" height="30" nowrap bgcolor="#8DA8CF" class='category'>序号</td>
	<td width="28%" nowrap bgcolor="#8DA8CF" class='category'>名称</td>
	<td width="9%" nowrap bgcolor="#8DA8CF" class='category'>人民币（元）</td>
	<td width="30%" nowrap bgcolor="#8DA8CF" class='category'>订单号</td>
	<td width="18%" nowrap bgcolor="#8DA8CF" class='category'>下载时间</td>
	<td width="9%" nowrap bgcolor="#8DA8CF" class='category'><p>管理操作</p>	  </td>
	</tr>
<?php
$sql="SELECT * from zl_pay order by id desc limit ".($thepage-1)*$maxpage.",$maxpage";
$rs=mysql_query($sql);
$i=1;
while($row=mysql_fetch_array($rs)){
$color=($i%2)?"#FFFFFF":"#eeeeee";
?>
<tr align='center' bgcolor=<?=$color?>>
<td height="25" align="center"><?=$i?></td>
<td align="center">
<?php
$zl_rs=@mysql_query("select z_title from ziliao where id='$row[zl_id]'");
$zl_row=@mysql_fetch_array($zl_rs);
?><a href="http://zl.sandib2b.cn/ziliao-info/<?=$row[zl_id]?>.html" target="_blank"><?=$zl_row[z_title]?></a></td>
<td align="center"><a href="zl_down.php?id=<?=$row[zl_id]?>" target="_blank">2</a></td>
<td align="center"><?=$row[transaction_id]?></td>
<td align="center"><?php if($row[add_time]>=date("Y-m-d")){?><font color="#FF0000"><?=$row['add_time']?></font><?php }else{?><?=$row['add_time']?><?php }?></td>
<td align="center"><a href="<?=$url?>?del_act=ok&del_id=<?=$row['id']?>" onClick="return del()">删除</a></td>
</tr>
<?php
$i++;}
$rs2=@mysql_query("SELECT count(id) FROM zl_pay ");
$totalrecord=@mysql_result($rs2,0);
@mysql_free_result($rs2);
$totalpage=@ceil($totalrecord/$maxpage);
?>
    <tr><form method="get" action="<?=$url?>">
       <td height="31" colspan="6" align="center" bgcolor="#FFFFFF">
	   <?php if($thepage>1){?>
	   <a href="<?=$url?>">第一页</a>&nbsp;<a href="<?=$url?>?page=<?=$thepage-1?>">上一页</a>
	   <?php }?>
	   <?php if($thepage!=$totalpage&&$totalpage>1){?>
	   <a href="<?=$url?>?page=<?=$thepage+1?>">下一页</a>&nbsp;<a href="<?=$url?>?page=<?=$totalpage?>">最后一页</a>
      <?php }?>【共<font color="red"><?=$totalrecord?></font>条记录】【每页<font color="red"><?=$maxpage?></font>条记录】【共<font color="red"><?=$totalpage?></font>页】      </td></form>
	</tr>
</table>
</center>
</BODY>
</HTML>

